package com.zqu.service.impl;

import com.zqu.mapper.MarketingOpportunitiesMapper;
import com.zqu.pojo.MarketingOpportunities;
import com.zqu.service.MarketingOpportunitiesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MarketingOpportunitiesServiceImpl implements MarketingOpportunitiesService {

    @Autowired(required = false)
    private MarketingOpportunitiesMapper marketingOpportunitiesMapper;

    @Override
    public MarketingOpportunities selectMarketingOpportunitiesById(long id) {
        return marketingOpportunitiesMapper.selectTById(id);
    }

    @Override
    public List<MarketingOpportunities> selectList(MarketingOpportunities marketingOpportunities) {
        return marketingOpportunitiesMapper.selectList(marketingOpportunities);
    }

    @Override
    public boolean insertMarketingOpportunities(MarketingOpportunities marketingOpportunities) {
        return marketingOpportunitiesMapper.insertT(marketingOpportunities)>0;
    }

    @Override
    public boolean updateMarketingOpportunities(MarketingOpportunities marketingOpportunities) {
        return marketingOpportunitiesMapper.updateT(marketingOpportunities)>0;
    }

    @Override
    public boolean deleteMarketingOpportunities(long id) {
        return marketingOpportunitiesMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteMarketingOpportunitiesByIds(String[] ids) {
        return marketingOpportunitiesMapper.deleteTByIds(ids)>0;
    }
}
